<?php

class App_Admin_Controller_User extends Lib_Controller {

    function index() {
        $this->data['users'] = $this->model->select('all');
    }

    function insert($data=null) {
        if ($data!=null&&is_array($data)) {
            if ($this->model->insert($data)!=false) {
                $this->data['message'] = "Insert successfully";
            } else {
                $this->data['message'] = "Insert failed";
            }
        }
    }

}
?>
